package com.atu.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 柜台二
 */
public class HttpServletRequest_qqzf_2 extends HttpServlet {

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        // 获取请求的参数（办事的材料）查看
        String username = request.getParameter("username");
        String password = request.getParameter("password");
        System.out.println("在 Servlet2（柜台 2）中查看参数（材料）：" + username);
        System.out.println("在 Servlet2（柜台 2）中查看参数（材料）：" + password);
        // 查看 柜台 1 是否有盖章
        Object key1 = request.getAttribute("username");
        Object key2 = request.getAttribute("password");
        System.out.println("柜台 1 是否有章：" + key1);
        System.out.println("柜台 1 是否有章：" + key2);
        // 处理自己的业务
        System.out.println("Servlet2 处理自己的业务 ");
    }
}
